<?php
return CMap::mergeArray(
		require_once(dirname(__FILE__).'/main.php'),
		array(
			// стандартный контроллер
			'defaultController' => 'profile/index',
			// компоненты
			'components'=>array(
				'urlManager'=>array(
					'urlFormat'=>'path',
					'showScriptName' => false,
					'rules'=>array(
						'ulogin/login'=>'ulogin/login',
						'login/'=>'site/login',
						'logout/'=>'site/logout',
						'forgot/'=>'site/forgot',
						'search/'=>'site/search',
						//'/'=>'site/index',
						'registration/'=>'site/registration',
						'search/'=>'search/index',
						//'search/index/<tab:\w>'=>'search/index',
						'id<profile:\d+>/people/'=>'people/index',
						/*begin*/
						//'id<id:\d+>/'=>'profile/index',
						'id<id:\d+>/'=>'profile/index',
						'id<profile:\d+>/settings/blacklist/add/<blacklist:\d+>'=>'profile/addBlackList',
						'id<profile:\d+>/settings/blacklist/remove/<blacklist:\d+>'=>'profile/deleteBlackList',
						'id<profile:\d+>/post/<comment_id:\d+>'=>'profile/post',
						'id<profile:\d+>/post/<comment_id:\d+>'=>'profile/post',
						'id<id:\d+>/settings/personal'=>'profile/settingsPersonal',
						'id<id:\d+>/settings'=>'profile/settingsPersonal',
						'id<id:\d+>/settings/general'=>'profile/settingsGeneral',
						'id<id:\d+>/settings/privacy'=>'profile/settingsPrivacy',
						'id<id:\d+>/settings/notification'=>'profile/settingsAlert',
						'id<id:\d+>/settings/blacklist'=>'profile/BlackList',
						/*video*/
						'id<profile:\d+>/video'=>'video/index',
						'id<profile:\d+>/video/<id:\d+>'=>'video/view',
						'id<profile:\d+>/video/update/<id:\d+>'=>'video/update',
						'id<profile:\d+>/video/edit'=>'video/admin',
						'id<profile:\d+>/video/create'=>'video/create',
							'group<group:\d+>/video'=>'video/indexGroup',
							'group<group:\d+>/video/<id:\d+>'=>'video/viewGroup',
							'group<group:\d+>/video/update/<id:\d+>'=>'video/updateGroup',
							'group<group:\d+>/video/edit'=>'video/adminGroup',
							'group<group:\d+>/video/create'=>'video/createGroup',
								'event<event:\d+>/video'=>'video/indexEvent',
								'event<event:\d+>/video/<id:\d+>'=>'video/viewEvent',
								'event<event:\d+>/video/update/<id:\d+>'=>'video/updateEvent',
								'event<event:\d+>/video/edit'=>'video/adminEvent',
								'event<event:\d+>/video/create'=>'video/createEvent',
						/*albums*/
						'id<profile:\d+>/albums'=>'albums/index',
						'id<profile:\d+>/albums/<id:\d+>'=>'albums/view',
						'id<profile:\d+>/albums/deletePhoto/<id:\d+>'=>'albums/deletePhoto',
						'id<profile:\d+>/albums/mainphoto/<id:\d+>'=>'albums/mainphoto',
						'id<profile:\d+>/albums/upload/<id:\d+>'=>'albums/upload',
						'id<profile:\d+>/albums/update/<id:\d+>'=>'albums/update',
						'id<profile:\d+>/albums/delete/<id:\d+>'=>'albums/delete',
						'id<profile:\d+>/albums/comments'=>'albums/comments',
						'id<profile:\d+>/albums/create'=>'albums/create',
						'id<profile:\d+>/albums/photo/<id:\d+>'=>'albums/photo',
							'group<group:\d+>/albums'=>'albums/indexGroup',
							'group<group:\d+>/albums/<id:\d+>'=>'albums/viewGroup',
							'group<group:\d+>/albums/deletePhoto/<id:\d+>'=>'albums/deletePhotoGroup',
							'group<group:\d+>/albums/mainphoto/<id:\d+>'=>'albums/mainphotoGroup',
							'group<group:\d+>/albums/upload/<id:\d+>'=>'albums/uploadGroup',
							'group<group:\d+>/albums/update/<id:\d+>'=>'albums/updateGroup',
							'group<group:\d+>/albums/delete/<id:\d+>'=>'albums/deleteGroup',
							'group<group:\d+>/albums/comments'=>'albums/commentsGroup',
							'group<group:\d+>/albums/create'=>'albums/createGroup',
							'group<group:\d+>/albums/photo/<id:\d+>'=>'albums/photoGroup',
								'event<event:\d+>/albums'=>'albums/indexEvent',
								'event<event:\d+>/albums/<id:\d+>'=>'albums/viewEvent',
								'event<event:\d+>/albums/deletePhoto/<id:\d+>'=>'albums/deletePhotoEvent',
								'event<event:\d+>/albums/mainphoto/<id:\d+>'=>'albums/mainphotoEvent',
								'event<event:\d+>/albums/upload/<id:\d+>'=>'albums/uploadEvent',
								'event<event:\d+>/albums/update/<id:\d+>'=>'albums/updateEvent',
								'event<event:\d+>/albums/delete/<id:\d+>'=>'albums/deleteEvent',
								'event<event:\d+>/albums/comments'=>'albums/commentsEvent',
								'event<event:\d+>/albums/create'=>'albums/createEvent',
								'event<event:\d+>/albums/photo/<id:\d+>'=>'albums/photoEvent',
						/*audio*/
						'id<profile:\d+>/audio'=>'audio/index',
						'id<profile:\d+>/audio/create'=>'audio/create',
						'id<profile:\d+>/audio/delete/<id:\d+>'=>'audio/delete',
						'id<profile:\d+>/audio/update/<id:\d+>'=>'audio/update',
						'id<profile:\d+>/audio/upload'=>'audio/upload',
							'group<group:\d+>/audio'=>'audio/indexGroup',
							'group<group:\d+>/audio/create'=>'audio/createGroup',
							'group<group:\d+>/audio/delete/<id:\d+>'=>'audio/deleteGroup',
							'group<group:\d+>/audio/update/<id:\d+>'=>'audio/updateGroup',
							'group<group:\d+>/audio/upload'=>'audio/uploadGroup',
								'event<event:\d+>/audio'=>'audio/indexEvent',
								'event<event:\d+>/audio/create'=>'audio/createEvent',
								'event<event:\d+>/audio/delete/<id:\d+>'=>'audio/deleteEvent',
								'event<event:\d+>/audio/update/<id:\d+>'=>'audio/updateEvent',
								'event<event:\d+>/audio/upload'=>'audio/uploadEvent',
						/*group*/
						'id<profile:\d+>/groups'=>'groups/index',
						'group<group:\d+>/urls'=>'groups/urls',
						'group<group:\d+>/subscribe'=>'groups/subscribe',
						'group<group:\d+>/unsubscribe/<id:\d+>'=>'groups/deleteUser',
						'group<group:\d+>/urls/<id:\d+>/update'=>'groups/updateUrl',
						'group<group:\d+>/contacts'=>'groups/contacts',
						'group<group:\d+>/members'=>'groups/members',
						'group<group:\d+>/settings'=>'groups/update',
						'group<group:\d+>/settings/request'=>'groups/settingsRequest',
						'group<group:\d+>/settings/memebers'=>'groups/settingsMember',
						'group<group:\d+>/settings/memebers/invite'=>'groups/inviteFriend',
						'group<group:\d+>/settings/memebers/<id:\d+>'=>'groups/ruler',
						'group<group:\d+>/settings/urls'=>'groups/settingsUrl',
						'group<group:\d+>/settings/urls/create'=>'groups/createUrls',
						'group<group:\d+>'=>'groups/view',
						'group<group:\d+>/discussion/create'=>'groupsDiscussion/create',
						'group<group:\d+>/discussion'=>'groupsDiscussion/index',
						'group<group:\d+>/discussion/<discussion:\d+>'=>'groupsDiscussion/view',
						'group<group:\d+>/discussion/<discussion:\d+>/delete'=>'groupsDiscussion/deleteDiscussion',
							/*event*/
						'group<group:\d+>/event'=>'event/index',
						'group<group:\d+>/event/create'=>'event/create',
						'group<group:\d+>/event/uploadAvatarPage'=>'event/uploadAvatarPage',
							'event<event:\d+>'=>'event/view',
							'event<event:\d+>/urls'=>'event/urls',
							'event<event:\d+>/subscribe'=>'event/subscribe',
							'event<event:\d+>/unsubscribe/<id:\d+>'=>'event/deleteUser',
							'event<event:\d+>/contacts'=>'event/viewContacts',
							'event<event:\d+>/settings'=>'event/update',
							'event<event:\d+>/settings/memebers'=>'event/settingsMember',
							'event<event:\d+>/settings/urls'=>'event/settingsUrl',
							'event<event:\d+>/settings/urls/create'=>'event/createUrls',
							'event<event:\d+>/urls/<id:\d+>/update'=>'event/updateUrl',
							'event<event:\d+>/members'=>'event/viewMembers',
							/*messages*/
						'id<profile:\d+>/messages'=>'messages/index',
						'id<profile:\d+>/messages/create/'=>'messages/createmessage',
						//'id<profile:\d+>/messages'=>'messages/getdialog',
						'id<profile:\d+>/messages/<companion:\d+>'=>'messages/getdialog',
						/*end*/
							
						'faq/<id:\d+>/<title:.*?>'=>'category/view',
							
						'<alias>'=>'site/page',
						'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
					),
				),
				// пользователь
				'user'=>array(
					'loginUrl'=>array('/site/login'),
				),

				// mailer
				'mailer'=>array(
					'pathViews' => 'application.views.backend.email',
					'pathLayouts' => 'application.views.email.backend.layouts'
				),
					
			),
		)
);